All aspects of this project were implemented in C++ using the OpenCV functions described herein. Also, all originally proposed ideas from the project proposal were implemented, with the exception of ANS, which was dropped primarily because it would reduce the number of features used in the depth map, of which there were already not as many as would be desired. Detailed now are the various successes and shortcomings of each component of the project.

\subsection{Hardware Results}
The camera array was completed and performed as necessary for this project. It was found, however, that all four of the cameras in the array could not operate simultaneously at a resolution greater than $320\times240$ because of bandwidth restrictions on the USB controller. It could be possible to split the cameras amongst different USB host controllers, therefore distributing bandwidth and allowing the array to operate at a higher resolution, possibly as high as $640\times480$.

\subsection{Settings and Camera Configuration Results}
These routines were implemented and performed as expected. The chosen storage format for settings is XML, and camera configurations such as exposure modes and levels are set and saved using \emph{uvcdynctrl} as described.

\subsection{Capture and Calibration Results}
As described, the images are captured and stored, and calibration was found to be unnecessary in terms of correcting the intrinsic camera distortion (Figure  \ref{fig:calib_results} ). The calibration step was useful, however, in determining the focal length of the cameras.

\begin{figure}[h!]
\centering
\includegraphics[width= 1\textwidth]{img/calib_results}
\caption{On the left is the original image and on the right is the undistorted image that is produced as a result of camera calibration. There is little difference between the images. The calibration was ultimately only used for focal information as a result.}
\label{fig:calib_results}
\end{figure}

\subsection{Correspondence Results}
The template matching approach, though it produced more tangible results, cannot be computed at a reasonable speed. It was found to take upwards of 5 minutes to compute the correspondences between the four cameras in the array, which is not fast enough to use for anything short of comparison. The feature based correspondence, though significantly computationally faster, was not able to find enough features in each of the images to produce a depth map that was dense enough to identify detail in the scene.

\subsection{Depth Map Generation Results}

Below are the results of the different algorithms used. Figure \ref{fig:combined_0} shows one scene that was used to test both algorithms. This scene was made to be very feature rich which is the more ideal situation when attempting to solve the correspondence problem. The lower right image ($cam_{1,1}$) was used as the anchor image.

\begin{figure}[h!]
\centering
\includegraphics[width= .75\textwidth]{img/combined_0}
\caption{Images captured by each camera of one scene. The images are shown in their relative camera positions.}
\label{fig:combined_0}
\end{figure}

The results of running template matching are shown in both Figures \ref{fig:template_depth_maps_close} and \ref{fig:template_depth_maps_conf}. In each figure there are four images shown. Three of the images are individual depth maps and are shown in the location where the comparison image was positioned which was compared to the anchor image. The image in the lower right is the result of combining the other three depth maps. The units on the scale on the right are in $mm$. In the case of Figure \ref{fig:template_depth_maps_close}, large disagreements among distance estimates were handled by choosing the closest point. For Figure \ref{fig:template_depth_maps_conf} the estimate with the highest confidence was used. It is seen that the confidence method provides slightly better results. In either case, the combined image provides more accurate information than any single depth map alone. 

\begin{figure}[h!]
\centering
\includegraphics[width= .75\textwidth]{img/template_depth_maps_close}
\caption{Three individual depth maps between the anchor image and the other images are shown in their respective positions. Template matching was used here. The lower right image is the result of averaging the three depth maps and using the closest point when a large disagreement exists. }
\label{fig:template_depth_maps_close}
\end{figure}

\begin{figure}[h!]
\centering
\includegraphics[width= .75\textwidth]{img/template_depth_maps_close}
\caption{Three individual depth maps between the anchor image and the other images are shown in their respective positions. Template matching was used here The lower right image is the result of averaging the three depth maps and using the most confident depth estimate when a large disagreement exists.}
\label{fig:template_depth_maps_conf}
\end{figure}

Figure \ref{fig:surf_depth_maps_conf} shows the result of the feature based matching approach on the scene. 
 
\begin{figure}[h!]
\centering
\includegraphics[width= .75\textwidth]{img/surf_depth_maps}
\caption{Three individual depth maps between the anchor image and the other images are shown in their respective positions. Feature based matching was used here. The lower right image is the result of averaging the three depth maps and using the closest depth estimate when a large disagreement exists.}
\label{fig:surf_depth_maps_conf}
\end{figure}

The result of overlaying the combined depth map onto the anchor image is shown for both the template matching and feature based approaches in Figures \ref{fig:hybrid_img_template_0_conf} and \ref{fig:surf_depth_maps_conf}, respectively.

\begin{figure}[h!]
\centering
\includegraphics[width= .5\textwidth]{img/hybrid_img_template_0_conf}
\caption{Overlay of combined depth map for template based matching approach with confidence option during merging.}
\label{fig:hybrid_img_template_0_conf}
\end{figure}

\begin{figure}[h!]
\centering
\includegraphics[width= .5\textwidth]{img/hybrid_img_surf_0}
\caption{Overlay of combined depth map for feature based matching approach with confidence option during merging.}
\label{fig:hybrid_img_surf_0}
\end{figure}